package com.mths.server.util;

import javax.servlet.http.HttpSession;

import com.mths.client.constant.SessionUser;
import com.mths.server.constant.ServerConstant;

public class SessionUtil {

	public static HttpSession session;

	public static SessionUser getSessionUser() {
		return (SessionUser) session.getAttribute(ServerConstant.SESSION_USER);
	}

	public static void putSessionUser(SessionUser sessionUser) {
		session.setAttribute(ServerConstant.SESSION_USER, sessionUser);
	}

	public static void removeSessionUserFromSession() {
		session.removeAttribute(ServerConstant.SESSION_USER);
	}
}
